import type { addCardInfo, cardData } from '@/types/card'
import { http } from '@/utils/http'

export const addGoodsByTypeId = (data: addCardInfo) => {
  return http({
    method: 'POST',
    url: 'goods/cart/appAddCart',
    data,
  })
}

export const getCardData = () => {
  return http<cardData[]>({
    method: 'GET',
    url: 'goods/cart/appGetCart',
    data: {},
  })
}

export const delCardData = (data: cardData) => {
  return http<string>({
    method: 'POST',
    url: 'goods/cart/appDelCart',
    data,
  })
}
